package com.mangguo.tingjian.account.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mangguo.tingjian.account.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @Description TODO
 * @Author luhongcai
 * @Date 2019/11/13 20:37
 * @Version V1.0
 **/
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from user where username=#{username} and delete_flag=0 and is_valid=1 ")
    User selectByUserName(String username);

    @Select("select * from user where email=#{email} and delete_flag=0 and is_valid=1 ")
    User selectByEmail(String email);


}
